﻿<!DOCTYPE html>
<html>
<head>
    <!-- Force latest IE rendering engine or ChromeFrame if installed -->
    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    <link href="~/Contents/Styles/Plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/Contents/Styles/Plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <link href="~/Contents/Styles/lib.css" rel="stylesheet" />
    <link href="~/Contents/Styles/libAdmin.css" rel="stylesheet" />
    @RenderSection("CSS", false)
    <!-- Bootstrap CSS fixes for IE6 -->
    <!--[if lt IE 7]><link rel="stylesheet" href="/Content/FileUpload/css/bootstrap/bootstrap-ie6.debug.css"><![endif]-->
    <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body>
    <div id="wrapper">
        <!-- Menu-->
        <nav class="navbar navbar-default navbar-fixed-top" role="navigation">

            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#my-navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>

                <!-- Logo -->
                <a class="navbar-brand logo-nav" href="/admin/documents">
                    <img src="../../../Contents/Image/LOGO-TTKT.png"></a><!-- /.Logo -->
            </div>

            <div id="my-navbar" class="collapse navbar-collapse">
                <ul id="navbar-left" class="nav navbar-nav side-nav" style="border-right: 1px solid #e7e7e7;">
                    <li class="active"><a href="/admin/documents"><i class="fa fa-dashboard home"></i>Quản lý tài liệu</a></li>
                    <li><a href="/admin/borrows"><i class="fa fa-bar-chart-o home"></i>Mượn-Trả tài liệu</a></li>
                    <li><a href="/admin/categories"><i class="fa fa-table home"></i>Danh mục tài liệu</a></li>
                    <li><a href="/admin/racks"><i class="fa fa-edit home"></i>Quản lý rack</a></li>
                    @if (User.IsInRole("System Admin"))
                    {
                        <li><a href="/admin/users"><i class="fa fa-users home"></i>Quản lý tài khoản</a></li>
                    }                    
                </ul>

                <ul class="nav navbar-nav navbar-right navbar-user">
                    <li><a href="/"><i class="fa fa-home home"></i>Trang chủ</a></li>
                    <li><a href="http://ttkt.vtv.net" target="_blank">TTKT Site</a></li>
                    @if (HttpContext.Current.User.Identity.IsAuthenticated)
                    {
                        <li class="dropdown">
                            <a id="authenticatedAction" href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user home"></i>Xin chào: @(HttpContext.Current.User.Identity.Name + " ")<b class="caret"></b></a>
                            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                <li><a href="#"><i class="fa fa-envelope home"></i>Thông báo <span class="badge">7</span></a></li>
                                <li><a href="#"><i class="fa fa-wrench home"></i>Cài đặt tài khoản</a></li>
                                @if (User.IsInRole("Lib Admin"))
                                {
                                    <li><a href="/admin/documents"><i class="fa fa-pencil-square-o home"></i>Quản lý tài liệu</a></li>                                    
                                }
                                else if (User.IsInRole("System Admin"))
                                {
                                    <li><a href="/admin/documents"><i class="fa fa-cog fa-spin home"></i>Quản trị hệ thống</a></li>
                                }                                
                                <li class="divider"></li>
                                <li><a href="#"><i class="fa fa-power-off home"></i>Đăng xuất</a></li>
                            </ul>
                        </li>
                    }
                    else
                    {
                        <li><a href="/">Đăng nhập</a></li>
                    }                    
                </ul>
            </div>


        </nav>
        <!-- /. End Menu-->
        <!-- Content-->
        <div id="page-wrapper">
            <!-- Header & Page infor-->
            @RenderSection("Header", false)

            <!-- Data-->
            @RenderBody()
        </div>
        <!-- /. End Content-->
    </div>

    <!-- Javascript-->
    <script src="~/Scripts/Plugins/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/Plugins/bootstrap.min.js"></script>
    <script src="~/Scripts/Plugins/bootstrap-paginator.min.js"></script>
    <script src="~/Scripts/App/DataService.js"></script>
    <script src="~/Scripts/App/AuthenService.js"></script>
    <script>
        var userName = '@(Request.IsAuthenticated ? HttpContext.Current.User.Identity.Name : "")';
        var authenSerivce = new AuthenService(userName);
        authenSerivce.Init();
    </script>
    @RenderSection("JS", false)
</body>
</html>
